<?php
/**
 * Created by PhpStorm.
 * User: root
 * Date: 7/18/14
 * Time: 11:06 AM
 */

namespace User\Validator;


class NoRecordExists extends AbstractRecord
{
    public function isValid($value)
    {
        $valid = true;
        $this->setValue($value);

        $result = $this->query($value);
        if ($result) {
            $valid = false;
            $this->error(self::ERROR_RECORD_FOUND);
        }

        return $valid;
    }

} 